<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=750, user-scalable=0">
    <meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
    <meta http-equiv="Pragma" content="no-cache" />
    <meta http-equiv="Expires" content="0" />
    <title>订单详情</title>
    <link rel="stylesheet" href="__PUBLIC__/css/weui.css?t=20141028987051">
    <link rel="stylesheet" href="__PUBLIC__/css/jquery-weui.min.css?t=20141028987051">
    <link href="__PUBLIC__/css/style.css?t=20141028987051" rel="stylesheet">
    <style>
      .layout.fixed {
    padding-bottom: 280px;
}
.btn-confirm {
    border-radius: 10px;
    height: 74px;
    width: 80%;
    background-color: #26adec;
    color: #ffffff;
    font-size: 42px;
    border: 0;
    outline: 0;
    display: block;
    margin: 20px auto;
}
.addmore_pic {
    border-radius: 10px;
    height: 74px;
    width: 80%;
    color: #222323;
    font-size: 42px;
    border: 0;
    outline: 0;
    display: block;
    margin: 20px auto;
     border: 5px solid #26adec;
}
.weui_icon_msg:before {
    font-size: 255px;
}

.weui_icon_success:before {
    font-size: 255px;
    color: #26ADEC;
}
    </style>
</head>

<body>
    <div class="layout fixed" id="page-home">
        <header>
            <a href="javascript:history.go(-1);" class="link-left">返回</a>
        </header>
    
        <!-- <div class="address-bd">
            <center>
            <table width="96%" border="0" align="center" cellpadding="0" cellspacing="0" style="line-height: 2.4rem; padding:1px; font-size:28px;">
              <tbody>
                <tr>
                  <td width="86%" height="40" align="left" valign="top">订单总价：</td>
                  <td width="14%" align="left" valign="top">{$orderinfo.cost}元</td>
                </tr>
              </tbody>
            </table>
            </center>
        </div> -->
        
        
        <div class="address-bd">
            <center>
            <table width="96%" border="0" align="center" cellpadding="0" cellspacing="0" style="line-height: 2.4rem; padding:10px; font-size:32px;">
              <tbody>
                
                <tr>
                  <td width="14%" align="left">姓&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;名：</td>
                  <td width="86%" align="left">{$orderinfo.name}</td>
                </tr>
                <tr>
                  <td align="left">电&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;话：</td>
                  <td align="left">{$orderinfo.mphone}</td>
                </tr>
                <tr>
                  <td height="40" align="left" valign="top">预约时间：</td>
                  <td align="left" valign="top">{$orderinfo.time}</td>
                </tr>
                <tr>
                  <td height="40" align="left" valign="top">选择车型：</td>
                  <td align="left" valign="top">{$orderinfo.car}</td>
                </tr>
                <tr>
                  <td align="left" valign="top">出&nbsp; 发&nbsp;&nbsp;地：</td>
                  <td align="left" valign="top">{$orderinfo.startadd}</td>
                </tr>
                <tr>
                  <td align="left" valign="top">目 &nbsp;的 &nbsp;地：</td>
                  <td align="left" valign="top">{$orderinfo.endadd}</td>
                </tr>
                <!-- <tr>
                  <td align="left" valign="top">行李件数：</td>
                  <td align="left" valign="top">{$orderinfo.bag_num|default=0}件</td>
                </tr> -->
                <tr>
                  <td align="left" valign="top">行李</td>
                  <td align="left" valign="top">{$orderinfo.items}</td>
                </tr>
                <tr>
                  <td align="left" valign="top">其他备注：</td>
                  <td align="left" valign="top">{$orderinfo.beizhu}</td>
                </tr>
              </tbody>
            </table>
            </center>
        </div>
        <eq name="orderinfo.upselect" value="2"> <button type="button" class="btn-confirm" id="uppic">上传图片</button></eq>
    </div>
    <div id="show-upload-pic" class="layout fixed" style="display: none">
                <div class="weui_msg">
                    <div class="weui_icon_area"><i class="weui_icon_success weui_icon_msg"></i></div>
                    <div class="weui_text_area">
                        <h2 style="color: #8E8A8A">上传完毕</h2>
                    </div>
                </div>
                <button type="button" class="addmore_pic" id="addmore_pic">上传更多</button>
                <button type="button" class="btn-confirm" id="finishimg">完成</button>
        </div>
    <php>
        require_once "jssdk.php";
$jssdk = new JSSDK("wx9332faa7c9589a0e", "d2c3b99cccae5dd77c00487033919ad2");
$signPackage = $jssdk->GetSignPackage();  
    </php>
    <script src="__PUBLIC__/js/jquery.min.js?t=20141028987051"></script>
    <script src="__PUBLIC__/js/jquery-weui.min.js?t=20141028987051"></script>
    <script src="__PUBLIC__/js/layer.js"></script>
    <script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
    <script>
      wx.config({
    debug: false, 
    appId: '<?php echo $signPackage["appId"];?>',
    timestamp: <?php echo $signPackage["timestamp"];?>,
    nonceStr: '<?php echo $signPackage["nonceStr"];?>',
    signature: '<?php echo $signPackage["signature"];?>',
    jsApiList: [
           /*
            * 所有要调用的 API 都要加到这个列表中
            * 这里以图像接口为例
            */
          "chooseImage",
          "previewImage",
          "uploadImage",
          "downloadImage"
    ]
  });
    var btn = document.getElementById('weixin');   
    var paytype='';
      var images = {  
        localId: [],  
        serverId: []  
    }; 
    var orderid='{$orderinfo.id}';
    $("#uppic,#addmore_pic").click(function () {
    wx.chooseImage({  
            success: function(res) { 
            $("#page-home").hide(); 
                images.localId = res.localIds;  
                alert('已选择 ' + res.localIds.length + ' 张图片');  
  
                if (images.localId.length == 0) {  
                    alert('请先使用 chooseImage 接口选择图片');  
                    return;  
                }  
                var i = 0, length = images.localId.length;  
                images.serverId = []; 
                function upload() {  
                    wx.uploadImage({  
                        localId: images.localId[i],  
                        success: function(res) {  
                            i++;  
                            //alert('已上传：' + i + '/' + length); 
                           //loadingToast();
                            images.serverId.push(res.serverId);  
                            if (i < length) {  
                                upload();  
                            }else{
                              $("#show-upload-pic").fadeIn(); 
                              $.post( '__CONTROLLER__/upweixinpic', 
                                      {otherimages:images.serverId,orderid:orderid}
                                    , function(data) {
                                      
                                    });
                               

                            } 
                        },  
                        fail: function(res) {  
                            alert(JSON.stringify(res));  
                        }  
                    });  
                }  
                upload();  
            }  
        }); 

});
     $("#finishimg").click(function () {
   WeixinJSBridge.call('closeWindow');

});
    </script>

</body>
</html>
